#include "dev_send.h"


Dev_send::Dev_send(Tcpserver *s, QTcpSocket *c)
{
    server = s;
    client = c;
}



void Dev_send::run()
{
    qDebug() << "Dev_send::run";
    connect(server, SIGNAL(sig_sendToClient(int,QString)),this,SLOT(serverinfo(int,QString)));
}

void Dev_send::serverinfo(int sockID, QString sendData)
{

    qDebug() << "serverinfo sendData:" << sendData << "sockID:" << sockID;
    QByteArray ba;
    ba += sendData;
    qDebug() << "服务器向客户端主动发送的信息：";

    ba += "收到";
    client->write(ba);
}
